<?php

/**
 * AbetAddDeleModif form base class.
 *
 * @method AbetAddDeleModif getObject() Returns the current form's model object
 *
 * @package    sfproject
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseAbetAddDeleModifForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                  => new sfWidgetFormInputHidden(),
      'sec_id'              => new sfWidgetFormInputHidden(),
      'abet_plan_study_id'  => new sfWidgetFormPropelChoice(array('model' => 'AbetPlanStudy', 'add_empty' => true)),
      'abet_instructor_id'  => new sfWidgetFormPropelChoice(array('model' => 'AbetInstructor', 'add_empty' => true)),
      'abet_student_id'     => new sfWidgetFormPropelChoice(array('model' => 'AbetStudent', 'add_empty' => true)),
      'student_request_for' => new sfWidgetFormInputText(),
      'advis_answer'        => new sfWidgetFormInputText(),
      'advis_explination'   => new sfWidgetFormInputText(),
      'created_at'          => new sfWidgetFormDateTime(),
      'updated_at'          => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                  => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'sec_id'              => new sfValidatorChoice(array('choices' => array($this->getObject()->getSecId()), 'empty_value' => $this->getObject()->getSecId(), 'required' => false)),
      'abet_plan_study_id'  => new sfValidatorPropelChoice(array('model' => 'AbetPlanStudy', 'column' => 'id', 'required' => false)),
      'abet_instructor_id'  => new sfValidatorPropelChoice(array('model' => 'AbetInstructor', 'column' => 'id', 'required' => false)),
      'abet_student_id'     => new sfValidatorPropelChoice(array('model' => 'AbetStudent', 'column' => 'id', 'required' => false)),
      'student_request_for' => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'advis_answer'        => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'advis_explination'   => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'created_at'          => new sfValidatorDateTime(array('required' => false)),
      'updated_at'          => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('abet_add_dele_modif[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetAddDeleModif';
  }


}
